!!!
%html{:lang=>'en'}
  %head    
    %link{:rel=>"stylesheet", :href=>"/css/bootstrap.min.css", :type=>"text/css"}
    %link{:rel=>"stylesheet", :href=>"/css/diebold.css", :type=>"text/css"}
    %link{:rel=>"stylesheet", :href=>"/css/timepicker.css", :type=>"text/css"}
    %script{:type=>"text/javascript", :src=>'/js/jquery-1.8.1.min.js'}          
    %script{:type=>"text/javascript", :src=>'/js/bootstrap.min.js'}    

    %title #{@page_title||'Diebold-o-tron'} @ Code4Lib

  %body
    %div{:class=>["navbar","navbar-inverse","navbar-fixed-top"]}
      %div{:class=>"navbar-inner"}
        %a{:class=>"brand", :href=>"#"} Code4Lib Diebold-o-Tron
        %ul{:class=>"nav"}
          %li.active
            %a{:href=>"/"} Home
        %ul{:class=>"nav pull-right"}
          -if session[:username]                        
            %li.dropdown
              %a{:href=>"#", :class=>"dropdown-toggle", :"data-toggle"=>"dropdown"}                  
                Signed in as
                = session[:username]
                %b.caret
              %ul{:class=>"dropdown-menu"}
                %li
                  %a{:href=>"/profile/"} Profile
                %li
                  %a{:href=>"/logout/"} Sign out
          - else
            %li.active
              %a{:href=>"#loginForm", :role=>"button", :"data-toggle"=>"modal"} Sign in
    %div{:class=>"container-fluid"}
      %div{:class=>"row-fluid"}
        .span2
          %div{:class=>["well","sidebar-nav"]}
            = haml :"/common/left_nav"
        .span10
          - if @event
            %div{:class=>"row-fluid"}
              .span9
                %h2 #{@event.name}:  #{@event.location}
          =yield
          
    - unless session[:username]
      #loginForm.modal.hide{:tabindex=>"-1", :role=>"dialog"}  
        %form{:action=>"/login/", :method=>"POST", :class=>"form-horizontal"}        
          %div{:class=>"modal-header"}
            %button.close{:type=>"button", :"data-dismiss"=>"modal"}×
            %h3 Sign in
          %div{:class=>"modal-body"}
            %div{:class=>["alert","alert-info"]}
              %strong Reminder:
              Sign in with your
              %a{:href=>"http://code4lib.org/", :target=>"_blank"} Code4lib.org
              %em Drupal
              username and password          
            %div{:class=>"control-group"}
              %label{:class=>"control-label", :for=>"username"} Username:
              .controls
                %input#username{:type=>'text', :name=>"username"}
            %div{:class=>"control-group"}
              %label{:class=>"control-label", :for=>'password'} Password
              .controls
                %input#password{:type=>"password", :name=>'password'}
            %input{:type=>"hidden", :name=>"return", :value=>request.fullpath}    
          %div{:class=>"modal-footer"}
            %a.btn{:href=>"#", :"data-dismiss"=>"modal"} Cancel
            %button{:type=>"submit", :class=>["btn","btn-primary"]} Sign in                 
    %script{:type => "text/javascript", :src => '/js/bootstrap-timepicker.js'}            
    %script{:type => "text/javascript", :src => '/js/diebold.js'}            
